<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <!-- <script>
        // 粒度
        let [json, arr, num, str] = [{ a: 12, b: 5 }, [12, 5, 8], 8, 'abc'];

        console.log(json, arr, num, str);
    </script> -->

    <script>
        // let [a, b] = {a: 12, b: 45}; // 左右结构不同

        // console.log(a, b);

        let [a, b];
        [a, b] = [12, 5]; // 声明和赋值分开了

        console.log(a, b);
    </script>
</body>

</html>